<!DOCTYPE html>
<html lang="en" class="md device-pixel-ratio-3 device-retina device-desktop device-windows support-position-sticky">

<head>
    <meta charset="utf-8" />
    <meta name="theme-color" content="#000000" />
    <meta name="viewport"
        content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1,minimum-scale=1" />
    <link rel="apple-touch-icon" href="favicon.ico" />
    <meta name="apple-mobile-web-app-title" content="坏坏漫画" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <meta name="format-detection" content="telephone=no" />
    <meta name="format-detection" content="email=no" />
    <meta name="referrer" content="never">

    <script type="text/javascript" src="js/debug.js"></script>
    <link rel="shortcut icon" href="./favicon.ico" />
    <title>漫画排行</title>
    <link href="css/main.48b4036a.css" rel="stylesheet">
    <link href="css/aui.css" rel="stylesheet" />
    <script type="text/javascript" src="js/jquery-3.3.1.min.js"></script>
    <script type="text/javascript" src="js/layer.js"></script>
    <script type="text/javascript" src="js/jquery.lazyload.min.js"></script>
    <script type="text/javascript" src="js/template-web.js"></script>
    <script type="text/javascript" src="js/aui-toast.js"></script>
    <script type="text/javascript" src="js/aui-dialog.js"></script>
    <script type="text/javascript" src="js/config.js" charset="utf-8"></script>
    <div style="display: none;">
    </div>



</head>

<body>
    <div id="root" style="height: 100%;">
        <div id="framework7-root" class="framework7-root ">
            <div class="panel-backdrop"></div>
            <div class="panel panel-left panel-reveal">
                <div id="chapterDirectory" class="page">
                    <div class="page-content">
                        <div class="block-title">目录</div>
                        <div class="no-margin-bottom list virtual-list">
                            <ul id="leftpannel" style="height: 5667.84px;">
                                <li class="bg-color-default text-color-primary"
                                    style="height: 0.48rem; top: 0px; font-size: 110%; font-weight: 700;"><a
                                        class="item-link" href="#">
                                        <div class="item-content">

                                            <div class="item-inner">
                                                <div class="item-title">第1話-&lt;1&gt;</div>
                                            </div>
                                        </div>
                                    </a></li>

                            </ul>
                        </div>
                    </div>
                </div>
            </div>
            <div class="panel panel-right panel-reveal">
                   <!-- 侧边栏 -->
                   <div class="page" id="right-page">
                    <script>
                        $("#right-page").load("right-page.html");
                    </script>
                </div>
            </div>
            <div class="view view-main">

                <div class="view view-main">
                    <div class="page page-current page-with-subnavbar" data-name="bookList">
                        <div class="navbar">
                            <div class="navbar-inner sliding">
                                <div class="left"><a class="icon-only link icon-only back"
                                        href="javascript:history.go(-1);"><i class="icon icon-back"></i></a></div>
                                <div class="title">排行榜</div>
                                <div class="right"><a class="icon-big link icon-only" href="/search.html"><i
                                            class="icon material-icons">search</i></a></div>
                                <div class="subnavbar">
                                    <div class="toolbar tabbar">
                                        <div class="toolbar-inner">
                                            <a class="link tab-link tab-link1 tab-link-active"
                                                href="javascript:tablist(1)">人气榜</a>
                                            <a class="link tab-link tab-link2" href="javascript:tablist(2)">畅销榜</a>
                                            <a class="link tab-link tab-link3" href="javascript:tablist(3)">收藏榜</a>
                                            <a class="link tab-link tab-link4" href="javascript:tablist(4)">搜索榜</a>
                                            <span class="tab-link-highlight"
                                                style="width: 25%; transform: translate3d(0%, 0px, 0px);"></span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="page-content infinite-scroll-content hide-navbar-on-scroll">
                            <div class="no-margin reader-book-list list">
                                <ul class="aui-media-list">
                                    <li class="">
                                        <div class="item-content">
                                            <div class="item-inner">
                                                <div class="width-100 justify-content-start row no-gap">
                                                    <div class="text-align-center width-100 block"
                                                        style="margin-top: 30vh;"><i
                                                            class="icon material-icons color-gray"
                                                            style="font-size: 5em;">storage</i>
                                                        <p class="text-color-gray text-align-center">暂无记录~</p>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </li>

                                </ul>
                            </div>
                            <div>
                                <p class="reader-infinite-preloader"></p>
                            </div>
                        </div>
                    </div>
                </div>

                <script type="text/html" id="one_list_item">
                {{each list value i}}
                    <!--列表项-->
                    <li class="">
                    <div class="item-content">
                        <div class="item-inner">
                            <div class="-margin-horizontal-sm flex-grow-1"><a class="reader-book reader-book-default reader-book-media" href="/book.html?id={{value['id']}}">
                                    <div class="">
                                        <div class="cover">
                                    <img src="{{value['image']}}" alt="">
                                            {{if value['mhstatus']==0}}
                                                <span class="status" data-status="serialized">连载</span>
                                            {{/if}}
                                            {{if value['mhstatus']==1}}
                                                <span class="status" data-status="finish">完结</span>
                                            {{/if}}
                                            
                                            {{if value['tjswitch']==1}}
                                                <span class="type" data-type="recommend"></span>
                                            {{/if}}

                                            {{if value['isjingpin']==1}}
                                                <span class="type" data-type="competitive"></span>
                                            {{/if}}

                                            {{if value['xianmian']==1}}
                                                <span class="type" data-type="free_in_limit_time"></span>
                                            {{/if}}
                                        </div>
                                        <span class="name">{{value['title']}}</span>
                                        <p class="desc">{{value['desc']}}....</p>
                                        <div class="footer">
                                            <span class="score"><i class="icon material-icons">star</i> {{value['pingfen']}}</span>
                                            <span class="readCount"><i class="icon material-icons">remove_red_eye</i> {{value['view']}}</span>
                                            <span class="author">作者：{{value['auther']}}</span>
                                            
                                        </div>
                                    </div>
                                </a></div>
                        </div>
                    </div>
                </li>
                 {{/each}}
                </script>

            </div>
            <div class="framework7-modals"></div>
            <div class="actions-backdrop"></div>
            <div class="dialog-backdrop"></div>
            <div class="dialog dialog-buttons-1 dialog-buttons-vertical reader-copy-modal modal-in"
                style="display: none; margin-top: -372px;">
                <div class="dialog-inner">
                    <div class="dialog-title"></div>
                    <div class="dialog-text"></div>
                    <input id="foo" type="link" value="" readonly="">
                </div>
                <div class="dialog-buttons">
                    <span class="dialog-button dialog-button-bold text-align-center text-color-primary"
                        data-clipboard-action="copy" data-clipboard-target="#foo">复制链接</span>
                </div>
            </div>
            <div class="popover-backdrop"></div>
            <div class="toast">
                <div class="toast-content">
                    <div class="toast-icon"></div>
                    <div class="toast-text"></div>
                    <a class="toast-button"></a>
                </div>
            </div>

        </div>
    </div>
    <script type="text/javascript" src="js/yymh.js"></script>
    <script src="js/clipboard.min.js"></script>

    <script type="text/javascript">
        window.rankData = null;

        //初始化tab工具
        function initRankFooter() {
            var tab = new auiTab({
                element: document.getElementById("footer"),
                index: 3,
                repeatClick: true
            }, function (ret) {
                initGetRankData(ret.index);
            });
        }

        function initRankTab() {
            var tab = new auiTab({
                element: document.getElementById("tab"),
                index: 1,
                repeatClick: true
            }, function (ret) {
                initGetRankData(ret.index);
            });
        }

        function tablist(index) {
            $('.tab-link').removeClass('tab-link-active');
            $('.tab-link' + index).addClass('tab-link-active');
            var cc = 'translate3d(' + (index - 1) * 100 + '%, 0px, 0px)'
            $('.tab-link-highlight').css('transform', cc);
            initGetRankData(index);
        }

        //获取排行数据
        function getRankData(callback) {
            if (window.rankData == null) {
                appCenter.doGetRankData(1, function (data) {
                    console.log(data);
                    window.rankData = data;
                    if (callback)
                        callback();
                });
            } else {
                if (callback)
                    callback();
            }
        }

        //获取排行数据
        function initGetRankData(type) {
            appCenter.showLoadingToast('正在加载中...');
            $('.pager-panel').text('数据到底');
            getRankData(function () {
                var data = window.rankData.most_clicks;
                if (type == 2)
                    data = window.rankData.most_consumes;
                else if (type == 3)
                    data = window.rankData.most_favorites;
                else if (type == 4)
                    data = window.rankData.most_search;
                // var data2.list=data;
                var data2 = {
                    title: '基本例子',
                    isAdmin: true,
                    list: data
                };
                var html = template("one_list_item", data2);
                $('.aui-media-list').html(html);
                window.toast.hide();
                $("img.lazy").lazyload();
                $('.pager-panel').text('数据到底');
            });
            
        }
        //初始化
        $(function () {
            initGetRankData(1);
        });
    </script>

</body>

</html>